tests/ceftests/jsdialog_unittest.cc
TEST(JSDialogTest, PromptRunDelayedCancel) {
  CefRefPtr<JSDialogTestHandler> handler = new JSDialogTestHandler(
      JSDialogTestHandler::TYPE_PROMPT, JSDialogTestHandler::MODE_RUN_DELAYED,
      false,         // success
      "some_value",  // user_input
      "null");       // 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);
}
// Prompt dialog run delayed return Cancel.
Prompt dialog run delayed return Cancel.
Prompt dialog run delayed return Cancel .
TEST(JSDialogTest, PromptRunDelayedCancel) {
  CefRefPtr<JSDialogTestHandler> handler = new JSDialogTestHandler(
      JSDialogTestHandler::TYPE_PROMPT, JSDialogTestHandler::MODE_RUN_DELAYED,
      false,         
      "some_value",  
      "null");       
  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 , PromptRunDelayedCancel ) { CefRefPtr < JSDialogTestHandler > handler = new JSDialogTestHandler ( JSDialogTestHandler :: TYPE_PROMPT , JSDialogTestHandler :: MODE_RUN_DELAYED , 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 ) ; }
Prompt dialog run delayed return Cancel.
Prompt dialog run delayed return Cancel .
// success // user_input // result