OLD | NEW |
1 // Copyright (c) 2011 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" |
11 #include "base/debug/debug_on_start_win.h" | 11 #include "base/debug/debug_on_start_win.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 accelerated_compositing_enabled_; | 358 accelerated_compositing_enabled_; |
359 // Allow those layout tests running as local files, i.e. under | 359 // Allow those layout tests running as local files, i.e. under |
360 // LayoutTests/http/tests/local, to access http server. | 360 // LayoutTests/http/tests/local, to access http server. |
361 if (layout_test_mode_) | 361 if (layout_test_mode_) |
362 web_prefs_->allow_universal_access_from_file_urls = true; | 362 web_prefs_->allow_universal_access_from_file_urls = true; |
363 web_prefs_->visual_word_movement_enabled = false; | 363 web_prefs_->visual_word_movement_enabled = false; |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 // static | 367 // static |
| 368 WebPreferences* TestShell::GetWebPreferences() { |
| 369 DCHECK(web_prefs_); |
| 370 return web_prefs_; |
| 371 } |
| 372 |
| 373 // static |
368 bool TestShell::RemoveWindowFromList(gfx::NativeWindow window) { | 374 bool TestShell::RemoveWindowFromList(gfx::NativeWindow window) { |
369 WindowList::iterator entry = | 375 WindowList::iterator entry = |
370 std::find(TestShell::windowList()->begin(), | 376 std::find(TestShell::windowList()->begin(), |
371 TestShell::windowList()->end(), | 377 TestShell::windowList()->end(), |
372 window); | 378 window); |
373 if (entry != TestShell::windowList()->end()) { | 379 if (entry != TestShell::windowList()->end()) { |
374 TestShell::windowList()->erase(entry); | 380 TestShell::windowList()->erase(entry); |
375 return true; | 381 return true; |
376 } | 382 } |
377 | 383 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 return device_orientation_client_mock_.get(); | 605 return device_orientation_client_mock_.get(); |
600 } | 606 } |
601 | 607 |
602 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { | 608 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { |
603 if (!geolocation_client_mock_.get()) { | 609 if (!geolocation_client_mock_.get()) { |
604 geolocation_client_mock_.reset( | 610 geolocation_client_mock_.reset( |
605 WebKit::WebGeolocationClientMock::create()); | 611 WebKit::WebGeolocationClientMock::create()); |
606 } | 612 } |
607 return geolocation_client_mock_.get(); | 613 return geolocation_client_mock_.get(); |
608 } | 614 } |
OLD | NEW |