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

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

Issue 255042: Reverting 27711. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/mac/webview_host.mm ('k') | webkit/tools/test_shell/test_shell_mac.mm » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "webkit/tools/test_shell/test_shell.h" 5 #include "webkit/tools/test_shell/test_shell.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <fontconfig/fontconfig.h> 9 #include <fontconfig/fontconfig.h>
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 shell->GoBackOrForward(-1); 81 shell->GoBackOrForward(-1);
82 } 82 }
83 83
84 // Callback for when you click the forward button. 84 // Callback for when you click the forward button.
85 void ForwardButtonClicked(GtkButton* button, TestShell* shell) { 85 void ForwardButtonClicked(GtkButton* button, TestShell* shell) {
86 shell->GoBackOrForward(1); 86 shell->GoBackOrForward(1);
87 } 87 }
88 88
89 // Callback for when you click the stop button. 89 // Callback for when you click the stop button.
90 void StopButtonClicked(GtkButton* button, TestShell* shell) { 90 void StopButtonClicked(GtkButton* button, TestShell* shell) {
91 shell->webView()->StopLoading(); 91 shell->webView()->mainFrame()->stopLoading();
92 } 92 }
93 93
94 // Callback for when you click the reload button. 94 // Callback for when you click the reload button.
95 void ReloadButtonClicked(GtkButton* button, TestShell* shell) { 95 void ReloadButtonClicked(GtkButton* button, TestShell* shell) {
96 shell->Reload(); 96 shell->Reload();
97 } 97 }
98 98
99 // Callback for when you press enter in the URL box. 99 // Callback for when you press enter in the URL box.
100 void URLEntryActivate(GtkEntry* entry, TestShell* shell) { 100 void URLEntryActivate(GtkEntry* entry, TestShell* shell) {
101 const gchar* url = gtk_entry_get_text(entry); 101 const gchar* url = gtk_entry_get_text(entry);
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 // ResetTestController may have closed the window we were holding on to. 527 // ResetTestController may have closed the window we were holding on to.
528 // Grab the first window again. 528 // Grab the first window again.
529 window = *(TestShell::windowList()->begin()); 529 window = *(TestShell::windowList()->begin());
530 shell = static_cast<TestShell*>(g_object_get_data(G_OBJECT(window), "test-shel l")); 530 shell = static_cast<TestShell*>(g_object_get_data(G_OBJECT(window), "test-shel l"));
531 DCHECK(shell); 531 DCHECK(shell);
532 532
533 // Clear focus between tests. 533 // Clear focus between tests.
534 shell->m_focusedWidgetHost = NULL; 534 shell->m_focusedWidgetHost = NULL;
535 535
536 // Make sure the previous load is stopped. 536 // Make sure the previous load is stopped.
537 shell->webView()->StopLoading(); 537 shell->webView()->mainFrame()->stopLoading();
538 shell->navigation_controller()->Reset(); 538 shell->navigation_controller()->Reset();
539 539
540 // Clean up state between test runs. 540 // Clean up state between test runs.
541 webkit_glue::ResetBeforeTestRun(shell->webView()); 541 webkit_glue::ResetBeforeTestRun(shell->webView());
542 ResetWebPreferences(); 542 ResetWebPreferences();
543 web_prefs_->Apply(shell->webView()); 543 web_prefs_->Apply(shell->webView());
544 544
545 // TODO(agl): Maybe make the window hidden in the future. Window does this 545 // TODO(agl): Maybe make the window hidden in the future. Window does this
546 // by positioning it off the screen but the GTK function to do this is 546 // by positioning it off the screen but the GTK function to do this is
547 // deprecated and appears to have been removed. 547 // deprecated and appears to have been removed.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 break; 671 break;
672 } 672 }
673 return TestShell::NetResourceProvider(resource_id); 673 return TestShell::NetResourceProvider(resource_id);
674 } 674 }
675 675
676 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { 676 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
677 NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); 677 NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins);
678 } 678 }
679 679
680 } // namespace webkit_glue 680 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/mac/webview_host.mm ('k') | webkit/tools/test_shell/test_shell_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698