| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 3395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3406 bool is_reload, | 3406 bool is_reload, |
| 3407 const DialogClosedCallback& callback) override {} | 3407 const DialogClosedCallback& callback) override {} |
| 3408 | 3408 |
| 3409 bool HandleJavaScriptDialog(WebContents* web_contents, | 3409 bool HandleJavaScriptDialog(WebContents* web_contents, |
| 3410 bool accept, | 3410 bool accept, |
| 3411 const base::string16* prompt_override) override { | 3411 const base::string16* prompt_override) override { |
| 3412 return true; | 3412 return true; |
| 3413 } | 3413 } |
| 3414 | 3414 |
| 3415 void CancelDialogs(WebContents* web_contents, | 3415 void CancelDialogs(WebContents* web_contents, |
| 3416 bool suppress_callbacks, | |
| 3417 bool reset_state) override { | 3416 bool reset_state) override { |
| 3418 if (reset_state) | 3417 if (reset_state) |
| 3419 ++reset_count_; | 3418 ++reset_count_; |
| 3420 } | 3419 } |
| 3421 | 3420 |
| 3422 private: | 3421 private: |
| 3423 size_t reset_count_ = 0; | 3422 size_t reset_count_ = 0; |
| 3424 | 3423 |
| 3425 DISALLOW_COPY_AND_ASSIGN(TestJavaScriptDialogManager); | 3424 DISALLOW_COPY_AND_ASSIGN(TestJavaScriptDialogManager); |
| 3426 }; | 3425 }; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 3440 // An automatic navigation. | 3439 // An automatic navigation. |
| 3441 main_test_rfh()->SendNavigateWithModificationCallback( | 3440 main_test_rfh()->SendNavigateWithModificationCallback( |
| 3442 0, true, GURL(url::kAboutBlankURL), base::Bind(SetAsNonUserGesture)); | 3441 0, true, GURL(url::kAboutBlankURL), base::Bind(SetAsNonUserGesture)); |
| 3443 | 3442 |
| 3444 EXPECT_EQ(1u, dialog_manager.reset_count()); | 3443 EXPECT_EQ(1u, dialog_manager.reset_count()); |
| 3445 | 3444 |
| 3446 contents()->SetJavaScriptDialogManagerForTesting(nullptr); | 3445 contents()->SetJavaScriptDialogManagerForTesting(nullptr); |
| 3447 } | 3446 } |
| 3448 | 3447 |
| 3449 } // namespace content | 3448 } // namespace content |
| OLD | NEW |