| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } | 548 } |
| 549 | 549 |
| 550 void TestShell::Show(WebNavigationPolicy policy) { | 550 void TestShell::Show(WebNavigationPolicy policy) { |
| 551 delegate_->show(policy); | 551 delegate_->show(policy); |
| 552 } | 552 } |
| 553 | 553 |
| 554 void TestShell::BindJSObjectsToWindow(WebFrame* frame) { | 554 void TestShell::BindJSObjectsToWindow(WebFrame* frame) { |
| 555 // Only bind the test classes if we're running tests. | 555 // Only bind the test classes if we're running tests. |
| 556 if (layout_test_mode_) { | 556 if (layout_test_mode_) { |
| 557 accessibility_controller_->BindToJavascript( | 557 accessibility_controller_->BindToJavascript( |
| 558 frame, L"accessibilityController"); | 558 frame, "accessibilityController"); |
| 559 layout_test_controller_->BindToJavascript(frame, L"layoutTestController"); | 559 layout_test_controller_->BindToJavascript(frame, "layoutTestController"); |
| 560 event_sending_controller_->BindToJavascript(frame, L"eventSender"); | 560 event_sending_controller_->BindToJavascript(frame, "eventSender"); |
| 561 plain_text_controller_->BindToJavascript(frame, L"plainText"); | 561 plain_text_controller_->BindToJavascript(frame, "plainText"); |
| 562 text_input_controller_->BindToJavascript(frame, L"textInputController"); | 562 text_input_controller_->BindToJavascript(frame, "textInputController"); |
| 563 } | 563 } |
| 564 } | 564 } |
| 565 | 565 |
| 566 void TestShell::DumpBackForwardEntry(int index, std::wstring* result) { | 566 void TestShell::DumpBackForwardEntry(int index, std::wstring* result) { |
| 567 int current_index = navigation_controller_->GetLastCommittedEntryIndex(); | 567 int current_index = navigation_controller_->GetLastCommittedEntryIndex(); |
| 568 | 568 |
| 569 std::string content_state = | 569 std::string content_state = |
| 570 navigation_controller_->GetEntryAtIndex(index)->GetContentState(); | 570 navigation_controller_->GetEntryAtIndex(index)->GetContentState(); |
| 571 if (content_state.empty()) { | 571 if (content_state.empty()) { |
| 572 content_state = webkit_glue::CreateHistoryStateForURL( | 572 content_state = webkit_glue::CreateHistoryStateForURL( |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { | 889 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { |
| 890 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { | 890 if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { |
| 891 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path); | 891 NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path); |
| 892 plugins->erase(plugins->begin() + i); | 892 plugins->erase(plugins->begin() + i); |
| 893 } | 893 } |
| 894 } | 894 } |
| 895 } | 895 } |
| 896 } | 896 } |
| 897 | 897 |
| 898 } // namespace webkit_glue | 898 } // namespace webkit_glue |
| OLD | NEW |