tests/ceftests/jsdialog_unittest.cc
TEST(JSDialogTest, AlertRunImmediate) {
  CefRefPtr<JSDialogTestHandler> handler = new JSDialogTestHandler(
      JSDialogTestHandler::TYPE_ALERT, JSDialogTestHandler::MODE_RUN_IMMEDIATE,
      true,  // success
      "",    // user_input
      "");   // 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);
}
// Alert dialog with immediate callback.
Alert dialog with immediate callback.
Alert dialog with immediate callback .
TEST(JSDialogTest, AlertRunImmediate) {
  CefRefPtr<JSDialogTestHandler> handler = new JSDialogTestHandler(
      JSDialogTestHandler::TYPE_ALERT, JSDialogTestHandler::MODE_RUN_IMMEDIATE,
      true,  
      "",    
      "");   
  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 , AlertRunImmediate ) { CefRefPtr < JSDialogTestHandler > handler = new JSDialogTestHandler ( JSDialogTestHandler :: TYPE_ALERT , JSDialogTestHandler :: MODE_RUN_IMMEDIATE , true , " " , " " ) ; handler -> ExecuteTest ( ) ; EXPECT_TRUE ( handler -> got_onjsdialog_ ) ; EXPECT_FALSE ( handler -> got_onbeforeunloaddialog_ ) ; EXPECT_TRUE ( handler -> got_onresetdialogstate_ ) ; EXPECT_TRUE ( handler -> got_onloadend_ ) ; ReleaseAndWaitForDestructor ( handler ) ; }
Alert dialog with immediate callback.
Alert dialog with immediate callback .
// success // user_input // result