Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Side by Side Diff: webkit/tools/test_shell/test_shell.cc

Issue 9003013: Remove some wstrings in test_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | webkit/tools/test_shell/test_shell_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 477
478 void TestShell::ResetTestController() { 478 void TestShell::ResetTestController() {
479 layout_test_controller_->Reset(); 479 layout_test_controller_->Reset();
480 notification_presenter_->Reset(); 480 notification_presenter_->Reset();
481 delegate_->Reset(); 481 delegate_->Reset();
482 if (geolocation_client_mock_.get()) 482 if (geolocation_client_mock_.get())
483 geolocation_client_mock_->resetMock(); 483 geolocation_client_mock_->resetMock();
484 } 484 }
485 485
486 void TestShell::LoadFile(const FilePath& file) { 486 void TestShell::LoadFile(const FilePath& file) {
487 LoadURLForFrame(net::FilePathToFileURL(file), std::wstring()); 487 LoadURLForFrame(net::FilePathToFileURL(file), string16());
488 } 488 }
489 489
490 void TestShell::LoadURL(const GURL& url) { 490 void TestShell::LoadURL(const GURL& url) {
491 LoadURLForFrame(url, std::wstring()); 491 LoadURLForFrame(url, string16());
492 } 492 }
493 493
494 bool TestShell::Navigate(const TestNavigationEntry& entry, bool reload) { 494 bool TestShell::Navigate(const TestNavigationEntry& entry, bool reload) {
495 // Get the right target frame for the entry. 495 // Get the right target frame for the entry.
496 WebFrame* frame = webView()->mainFrame(); 496 WebFrame* frame = webView()->mainFrame();
497 if (!entry.GetTargetFrame().empty()) { 497 if (!entry.GetTargetFrame().empty())
498 frame = webView()->findFrameByName( 498 frame = webView()->findFrameByName(entry.GetTargetFrame());
499 WideToUTF16Hack(entry.GetTargetFrame())); 499
500 }
501 // TODO(mpcomplete): should we clear the target frame, or should 500 // TODO(mpcomplete): should we clear the target frame, or should
502 // back/forward navigations maintain the target frame? 501 // back/forward navigations maintain the target frame?
503 502
504 // A navigation resulting from loading a javascript URL should not be 503 // A navigation resulting from loading a javascript URL should not be
505 // treated as a browser initiated event. Instead, we want it to look as if 504 // treated as a browser initiated event. Instead, we want it to look as if
506 // the page initiated any load resulting from JS execution. 505 // the page initiated any load resulting from JS execution.
507 if (!entry.GetURL().SchemeIs("javascript")) { 506 if (!entry.GetURL().SchemeIs("javascript")) {
508 delegate_->set_pending_extra_data( 507 delegate_->set_pending_extra_data(
509 new TestShellExtraData(entry.GetPageID())); 508 new TestShellExtraData(entry.GetPageID()));
510 } 509 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 return speech_input_controller_mock_.get(); 616 return speech_input_controller_mock_.get();
618 } 617 }
619 618
620 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { 619 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() {
621 if (!geolocation_client_mock_.get()) { 620 if (!geolocation_client_mock_.get()) {
622 geolocation_client_mock_.reset( 621 geolocation_client_mock_.reset(
623 WebKit::WebGeolocationClientMock::create()); 622 WebKit::WebGeolocationClientMock::create());
624 } 623 }
625 return geolocation_client_mock_.get(); 624 return geolocation_client_mock_.get();
626 } 625 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | webkit/tools/test_shell/test_shell_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698