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

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

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
OLDNEW
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 // This file contains the definition for LayoutTestController. 5 // This file contains the definition for LayoutTestController.
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "webkit/tools/test_shell/layout_test_controller.h" 9 #include "webkit/tools/test_shell/layout_test_controller.h"
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 LayoutTestController::WorkQueue::~WorkQueue() { 96 LayoutTestController::WorkQueue::~WorkQueue() {
97 Reset(); 97 Reset();
98 } 98 }
99 99
100 void LayoutTestController::WorkQueue::ProcessWorkSoon() { 100 void LayoutTestController::WorkQueue::ProcessWorkSoon() {
101 if (shell_->delegate()->top_loading_frame()) 101 if (shell_->delegate()->top_loading_frame())
102 return; 102 return;
103 103
104 if (!queue_.empty()) { 104 if (!queue_.empty()) {
105 // We delay processing queued work to avoid recursion problems. 105 // We delay processing queued work to avoid recursion problems.
106 timer_.Start(FROM_HERE, base::TimeDelta(), this, &WorkQueue::ProcessWork); 106 timer_.Start(base::TimeDelta(), this, &WorkQueue::ProcessWork);
107 } else if (!wait_until_done_) { 107 } else if (!wait_until_done_) {
108 shell_->TestFinished(); 108 shell_->TestFinished();
109 } 109 }
110 } 110 }
111 111
112 void LayoutTestController::WorkQueue::ProcessWork() { 112 void LayoutTestController::WorkQueue::ProcessWork() {
113 // Quit doing work once a load is in progress. 113 // Quit doing work once a load is in progress.
114 while (!queue_.empty()) { 114 while (!queue_.empty()) {
115 bool started_load = queue_.front()->Run(shell_); 115 bool started_load = queue_.front()->Run(shell_);
116 delete queue_.front(); 116 delete queue_.front();
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 result->SetNull(); 270 result->SetNull();
271 } 271 }
272 272
273 void LayoutTestController::LogErrorToConsole(const std::string& text) { 273 void LayoutTestController::LogErrorToConsole(const std::string& text) {
274 shell_->delegate()->didAddMessageToConsole( 274 shell_->delegate()->didAddMessageToConsole(
275 WebConsoleMessage(WebConsoleMessage::LevelError, 275 WebConsoleMessage(WebConsoleMessage::LevelError,
276 WebString::fromUTF8(text)), 276 WebString::fromUTF8(text)),
277 WebString(), 0); 277 WebString(), 0);
278 } 278 }
OLDNEW
« no previous file with comments | « webkit/quota/quota_temporary_storage_evictor.cc ('k') | webkit/tools/test_shell/simple_resource_loader_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698