| 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 "content/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 | 788 |
| 789 TitleWatcher::~TitleWatcher() { | 789 TitleWatcher::~TitleWatcher() { |
| 790 } | 790 } |
| 791 | 791 |
| 792 const base::string16& TitleWatcher::WaitAndGetTitle() { | 792 const base::string16& TitleWatcher::WaitAndGetTitle() { |
| 793 TestTitle(); | 793 TestTitle(); |
| 794 message_loop_runner_->Run(); | 794 message_loop_runner_->Run(); |
| 795 return observed_title_; | 795 return observed_title_; |
| 796 } | 796 } |
| 797 | 797 |
| 798 void TitleWatcher::DidStopLoading(RenderViewHost* render_view_host) { | 798 void TitleWatcher::DidStopLoading() { |
| 799 // When navigating through the history, the restored NavigationEntry's title | 799 // When navigating through the history, the restored NavigationEntry's title |
| 800 // will be used. If the entry ends up having the same title after we return | 800 // will be used. If the entry ends up having the same title after we return |
| 801 // to it, as will usually be the case, then WebContentsObserver::TitleSet | 801 // to it, as will usually be the case, then WebContentsObserver::TitleSet |
| 802 // will then be suppressed, since the NavigationEntry's title hasn't changed. | 802 // will then be suppressed, since the NavigationEntry's title hasn't changed. |
| 803 TestTitle(); | 803 TestTitle(); |
| 804 } | 804 } |
| 805 | 805 |
| 806 void TitleWatcher::TitleWasSet(NavigationEntry* entry, bool explicit_set) { | 806 void TitleWatcher::TitleWasSet(NavigationEntry* entry, bool explicit_set) { |
| 807 TestTitle(); | 807 TestTitle(); |
| 808 } | 808 } |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 | 968 |
| 969 bool WebContentsAddedObserver::RenderViewCreatedCalled() { | 969 bool WebContentsAddedObserver::RenderViewCreatedCalled() { |
| 970 if (child_observer_) { | 970 if (child_observer_) { |
| 971 return child_observer_->render_view_created_called_ && | 971 return child_observer_->render_view_created_called_ && |
| 972 child_observer_->main_frame_created_called_; | 972 child_observer_->main_frame_created_called_; |
| 973 } | 973 } |
| 974 return false; | 974 return false; |
| 975 } | 975 } |
| 976 | 976 |
| 977 } // namespace content | 977 } // namespace content |
| OLD | NEW |