| 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 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |    5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 
|    6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |    6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 
|    7  |    7  | 
|    8 #include <queue> |    8 #include <queue> | 
|    9 #include <string> |    9 #include <string> | 
|   10 #include <vector> |   10 #include <vector> | 
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  268   // Adds another title to watch for. |  268   // Adds another title to watch for. | 
|  269   void AlsoWaitForTitle(const base::string16& expected_title); |  269   void AlsoWaitForTitle(const base::string16& expected_title); | 
|  270  |  270  | 
|  271   // Waits until the title matches either expected_title or one of the titles |  271   // Waits until the title matches either expected_title or one of the titles | 
|  272   // added with AlsoWaitForTitle. Returns the value of the most recently |  272   // added with AlsoWaitForTitle. Returns the value of the most recently | 
|  273   // observed matching title. |  273   // observed matching title. | 
|  274   const base::string16& WaitAndGetTitle() WARN_UNUSED_RESULT; |  274   const base::string16& WaitAndGetTitle() WARN_UNUSED_RESULT; | 
|  275  |  275  | 
|  276  private: |  276  private: | 
|  277   // Overridden WebContentsObserver methods. |  277   // Overridden WebContentsObserver methods. | 
|  278   void DidStopLoading(RenderViewHost* render_view_host) override; |  278   void DidStopLoading() override; | 
|  279   void TitleWasSet(NavigationEntry* entry, bool explicit_set) override; |  279   void TitleWasSet(NavigationEntry* entry, bool explicit_set) override; | 
|  280  |  280  | 
|  281   void TestTitle(); |  281   void TestTitle(); | 
|  282  |  282  | 
|  283   std::vector<base::string16> expected_titles_; |  283   std::vector<base::string16> expected_titles_; | 
|  284   scoped_refptr<MessageLoopRunner> message_loop_runner_; |  284   scoped_refptr<MessageLoopRunner> message_loop_runner_; | 
|  285  |  285  | 
|  286   // The most recently observed expected title, if any. |  286   // The most recently observed expected title, if any. | 
|  287   base::string16 observed_title_; |  287   base::string16 observed_title_; | 
|  288  |  288  | 
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  394   WebContents* web_contents_; |  394   WebContents* web_contents_; | 
|  395   scoped_ptr<RenderViewCreatedObserver> child_observer_; |  395   scoped_ptr<RenderViewCreatedObserver> child_observer_; | 
|  396   scoped_refptr<MessageLoopRunner> runner_; |  396   scoped_refptr<MessageLoopRunner> runner_; | 
|  397  |  397  | 
|  398   DISALLOW_COPY_AND_ASSIGN(WebContentsAddedObserver); |  398   DISALLOW_COPY_AND_ASSIGN(WebContentsAddedObserver); | 
|  399 }; |  399 }; | 
|  400  |  400  | 
|  401 }  // namespace content |  401 }  // namespace content | 
|  402  |  402  | 
|  403 #endif  // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |  403 #endif  // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 
| OLD | NEW |