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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp

Issue 2827163003: Remove ClassicPendingScript::CreateForTesting() (Closed)
Patch Set: Rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ClassicPendingScript.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
index 8cc19d3cee6f102af65dd8c47227a515198b6d1b..92eb40e9fc613bb622db1e427964fae4b6ec6178 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
@@ -13,6 +13,7 @@
#include "bindings/core/v8/V8ScriptRunner.h"
#include "core/dom/ClassicPendingScript.h"
#include "core/dom/ClassicScript.h"
+#include "core/dom/MockScriptElementBase.h"
#include "core/frame/Settings.h"
#include "platform/heap/Handle.h"
#include "platform/testing/UnitTestHelpers.h"
@@ -34,11 +35,16 @@ class ScriptStreamingTest : public ::testing::Test {
->LoadingTaskRunner()),
settings_(Settings::Create()),
resource_request_("http://www.streaming-test.com/"),
- resource_(ScriptResource::Create(resource_request_, "UTF-8")),
- pending_script_(
- ClassicPendingScript::CreateForTesting(resource_.Get())) {
+ resource_(ScriptResource::Create(resource_request_, "UTF-8")) {
resource_->SetStatus(ResourceStatus::kPending);
- pending_script_ = ClassicPendingScript::CreateForTesting(resource_.Get());
+
+ MockScriptElementBase* element = MockScriptElementBase::Create();
+ // Basically we are not interested in ScriptElementBase* calls, just making
+ // the method(s) to return default values.
+ EXPECT_CALL(*element, IntegrityAttributeValue())
+ .WillRepeatedly(::testing::Return(String()));
+
+ pending_script_ = ClassicPendingScript::Create(element, resource_.Get());
ScriptStreamer::SetSmallScriptThresholdForTesting(0);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ClassicPendingScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698