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 #undef LOG | 5 #undef LOG |
6 | 6 |
7 #include "webkit/tools/test_shell/test_shell.h" | 7 #include "webkit/tools/test_shell/test_shell.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 }; | 107 }; |
108 | 108 |
109 | 109 |
110 } // namespace | 110 } // namespace |
111 | 111 |
112 // Initialize static member variable | 112 // Initialize static member variable |
113 WindowList* TestShell::window_list_; | 113 WindowList* TestShell::window_list_; |
114 WebPreferences* TestShell::web_prefs_ = NULL; | 114 WebPreferences* TestShell::web_prefs_ = NULL; |
115 bool TestShell::layout_test_mode_ = false; | 115 bool TestShell::layout_test_mode_ = false; |
116 bool TestShell::allow_external_pages_ = false; | 116 bool TestShell::allow_external_pages_ = false; |
117 int TestShell::file_test_timeout_ms_ = kDefaultFileTestTimeoutMillisecs; | |
118 bool TestShell::test_is_preparing_ = false; | |
119 bool TestShell::test_is_pending_ = false; | |
120 int TestShell::load_count_ = 1; | |
121 std::vector<std::string> TestShell::js_flags_; | 117 std::vector<std::string> TestShell::js_flags_; |
122 bool TestShell::accelerated_2d_canvas_enabled_ = false; | 118 bool TestShell::accelerated_2d_canvas_enabled_ = false; |
123 bool TestShell::accelerated_compositing_enabled_ = false; | 119 bool TestShell::accelerated_compositing_enabled_ = false; |
124 | 120 |
125 TestShell::TestParams::TestParams() | 121 TestShell::TestParams::TestParams() |
126 : dump_tree(true), | 122 : dump_tree(true), |
127 dump_pixels(false) { | 123 dump_pixels(false) { |
128 } | 124 } |
129 | 125 |
130 TestShell::TestShell() | 126 TestShell::TestShell() |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 TestShell::windowList()->end(), | 391 TestShell::windowList()->end(), |
396 window); | 392 window); |
397 if (entry != TestShell::windowList()->end()) { | 393 if (entry != TestShell::windowList()->end()) { |
398 TestShell::windowList()->erase(entry); | 394 TestShell::windowList()->erase(entry); |
399 return true; | 395 return true; |
400 } | 396 } |
401 | 397 |
402 return false; | 398 return false; |
403 } | 399 } |
404 | 400 |
405 void TestShell::TestTimedOut() { | |
406 puts("#TEST_TIMED_OUT\n"); | |
407 TestFinished(); | |
408 } | |
409 | |
410 void TestShell::Show(WebNavigationPolicy policy) { | 401 void TestShell::Show(WebNavigationPolicy policy) { |
411 delegate_->show(policy); | 402 delegate_->show(policy); |
412 } | 403 } |
413 | 404 |
414 void TestShell::DumpBackForwardEntry(int index, base::string16* result) { | 405 void TestShell::DumpBackForwardEntry(int index, base::string16* result) { |
415 int current_index = navigation_controller_->GetLastCommittedEntryIndex(); | 406 int current_index = navigation_controller_->GetLastCommittedEntryIndex(); |
416 | 407 |
417 std::string content_state = | 408 std::string content_state = |
418 navigation_controller_->GetEntryAtIndex(index)->GetContentState(); | 409 navigation_controller_->GetEntryAtIndex(index)->GetContentState(); |
419 if (content_state.empty()) { | 410 if (content_state.empty()) { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 return device_orientation_client_mock_.get(); | 606 return device_orientation_client_mock_.get(); |
616 } | 607 } |
617 | 608 |
618 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { | 609 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { |
619 if (!geolocation_client_mock_.get()) { | 610 if (!geolocation_client_mock_.get()) { |
620 geolocation_client_mock_.reset( | 611 geolocation_client_mock_.reset( |
621 WebKit::WebGeolocationClientMock::create()); | 612 WebKit::WebGeolocationClientMock::create()); |
622 } | 613 } |
623 return geolocation_client_mock_.get(); | 614 return geolocation_client_mock_.get(); |
624 } | 615 } |
OLD | NEW |