tests/ceftests/jsdialog_unittest.cc
TEST(JSDialogTest, ConfirmRunImmediateCancel) {
  CefRefPtr<JSDialogTestHandler> handler =
      new JSDialogTestHandler(JSDialogTestHandler::TYPE_CONFIRM,
                              JSDialogTestHandler::MODE_RUN_IMMEDIATE,
                              false,      // success
                              "",         // user_input
                              "cancel");  // result
  handler->ExecuteTest();

  EXPECT_TRUE(handler->got_onjsdialog_);
  EXPECT_FALSE(handler->got_onbeforeunloaddialog_);
  EXPECT_TRUE(handler->got_onresetdialogstate_);
  EXPECT_TRUE(handler->got_onloadend_);

  ReleaseAndWaitForDestructor(handler);
}
// Confirm dialog run immediately return Cancel.
Confirm dialog run immediately return Cancel.
Confirm dialog run immediately return Cancel .
TEST(JSDialogTest, ConfirmRunImmediateCancel) {
  CefRefPtr<JSDialogTestHandler> handler =
      new JSDialogTestHandler(JSDialogTestHandler::TYPE_CONFIRM,
                              JSDialogTestHandler::MODE_RUN_IMMEDIATE,
                              false,      
                              "",         
                              "cancel");  
  handler->ExecuteTest();
  EXPECT_TRUE(handler->got_onjsdialog_);
  EXPECT_FALSE(handler->got_onbeforeunloaddialog_);
  EXPECT_TRUE(handler->got_onresetdialogstate_);
  EXPECT_TRUE(handler->got_onloadend_);
  ReleaseAndWaitForDestructor(handler);
}
TEST ( JSDialogTest , ConfirmRunImmediateCancel ) { CefRefPtr < JSDialogTestHandler > handler = new JSDialogTestHandler ( JSDialogTestHandler :: TYPE_CONFIRM , JSDialogTestHandler :: MODE_RUN_IMMEDIATE , false , " " , " " ) ; handler -> ExecuteTest ( ) ; EXPECT_TRUE ( handler -> got_onjsdialog_ ) ; EXPECT_FALSE ( handler -> got_onbeforeunloaddialog_ ) ; EXPECT_TRUE ( handler -> got_onresetdialogstate_ ) ; EXPECT_TRUE ( handler -> got_onloadend_ ) ; ReleaseAndWaitForDestructor ( handler ) ; }
Confirm dialog run immediately return Cancel.
Confirm dialog run immediately return Cancel .
// success // user_input // result