tests/ceftests/jsdialog_unittest.cc
// OnBeforeUnload dialog with immediate callback.
OnBeforeUnload dialog with immediate callback.
OnBeforeUnload dialog with immediate callback .
TEST(JSDialogTest, OnBeforeUnloadRunImmediate) {
  CefRefPtr<JSDialogTestHandler> handler =
      new JSDialogTestHandler(JSDialogTestHandler::TYPE_ONBEFOREUNLOAD,
                              JSDialogTestHandler::MODE_RUN_IMMEDIATE,
                              true,  
                              "",    
                              "");   
  handler->ExecuteTest();
  EXPECT_FALSE(handler->got_onjsdialog_);
  EXPECT_TRUE(handler->got_onbeforeunloaddialog_);
  EXPECT_TRUE(handler->got_onresetdialogstate_);
  EXPECT_TRUE(handler->got_onloadend_);
  ReleaseAndWaitForDestructor(handler);
}
TEST ( JSDialogTest , OnBeforeUnloadRunImmediate ) { CefRefPtr < JSDialogTestHandler > handler = new JSDialogTestHandler ( JSDialogTestHandler :: TYPE_ONBEFOREUNLOAD , JSDialogTestHandler :: MODE_RUN_IMMEDIATE , true , " " , " " ) ; handler -> ExecuteTest ( ) ; EXPECT_FALSE ( handler -> got_onjsdialog_ ) ; EXPECT_TRUE ( handler -> got_onbeforeunloaddialog_ ) ; EXPECT_TRUE ( handler -> got_onresetdialogstate_ ) ; EXPECT_TRUE ( handler -> got_onloadend_ ) ; ReleaseAndWaitForDestructor ( handler ) ; }
OnBeforeUnload dialog with immediate callback.
OnBeforeUnload dialog with immediate callback .
// success // user_input // result