| 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 3385 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3396  public: |  3396  public: | 
|  3397   TestJavaScriptDialogManager() {} |  3397   TestJavaScriptDialogManager() {} | 
|  3398   ~TestJavaScriptDialogManager() override {} |  3398   ~TestJavaScriptDialogManager() override {} | 
|  3399  |  3399  | 
|  3400   size_t reset_count() { return reset_count_; } |  3400   size_t reset_count() { return reset_count_; } | 
|  3401  |  3401  | 
|  3402   // JavaScriptDialogManager |  3402   // JavaScriptDialogManager | 
|  3403  |  3403  | 
|  3404   void RunJavaScriptDialog(WebContents* web_contents, |  3404   void RunJavaScriptDialog(WebContents* web_contents, | 
|  3405                            const GURL& origin_url, |  3405                            const GURL& origin_url, | 
|  3406                            const std::string& accept_lang, |  | 
|  3407                            JavaScriptMessageType javascript_message_type, |  3406                            JavaScriptMessageType javascript_message_type, | 
|  3408                            const base::string16& message_text, |  3407                            const base::string16& message_text, | 
|  3409                            const base::string16& default_prompt_text, |  3408                            const base::string16& default_prompt_text, | 
|  3410                            const DialogClosedCallback& callback, |  3409                            const DialogClosedCallback& callback, | 
|  3411                            bool* did_suppress_message) override { |  3410                            bool* did_suppress_message) override { | 
|  3412     *did_suppress_message = true; |  3411     *did_suppress_message = true; | 
|  3413   }; |  3412   }; | 
|  3414  |  3413  | 
|  3415   void RunBeforeUnloadDialog(WebContents* web_contents, |  3414   void RunBeforeUnloadDialog(WebContents* web_contents, | 
|  3416                              bool is_reload, |  3415                              bool is_reload, | 
| (...skipping 29 matching lines...) Expand all  Loading... | 
|  3446   // An automatic navigation. |  3445   // An automatic navigation. | 
|  3447   contents()->GetMainFrame()->SendNavigateWithModificationCallback( |  3446   contents()->GetMainFrame()->SendNavigateWithModificationCallback( | 
|  3448       2, 0, true, GURL(url::kAboutBlankURL), base::Bind(SetAsNonUserGesture)); |  3447       2, 0, true, GURL(url::kAboutBlankURL), base::Bind(SetAsNonUserGesture)); | 
|  3449  |  3448  | 
|  3450   EXPECT_EQ(1u, delegate->reset_count()); |  3449   EXPECT_EQ(1u, delegate->reset_count()); | 
|  3451  |  3450  | 
|  3452   contents()->SetJavaScriptDialogManagerForTesting(nullptr); |  3451   contents()->SetJavaScriptDialogManagerForTesting(nullptr); | 
|  3453 } |  3452 } | 
|  3454  |  3453  | 
|  3455 }  // namespace content |  3454 }  // namespace content | 
| OLD | NEW |