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

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

Issue 2780463002: Introduce blink::Script (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/BUILD.gn » ('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 219ed91b409de32822809e7908ba5e6abcb193ed..fc7de6b435e9d035096e0b4898d00ca994ae2191 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
@@ -11,6 +11,7 @@
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8BindingForTesting.h"
#include "bindings/core/v8/V8ScriptRunner.h"
+#include "core/dom/ClassicScript.h"
#include "core/dom/Element.h"
#include "core/dom/PendingScript.h"
#include "core/frame/Settings.h"
@@ -128,8 +129,9 @@ TEST_F(ScriptStreamingTest, CompilingStreamedScript) {
ProcessTasksUntilStreamingComplete();
EXPECT_TRUE(client->Finished());
bool error_occurred = false;
- ScriptSourceCode source_code =
- GetPendingScript()->GetSource(KURL(), error_occurred);
+ ScriptSourceCode source_code = GetPendingScript()
+ ->GetSource(KURL(), error_occurred)
+ ->GetScriptSourceCode();
EXPECT_FALSE(error_occurred);
EXPECT_TRUE(source_code.Streamer());
v8::TryCatch try_catch(scope.GetIsolate());
@@ -167,8 +169,9 @@ TEST_F(ScriptStreamingTest, CompilingStreamedScriptWithParseError) {
EXPECT_TRUE(client->Finished());
bool error_occurred = false;
- ScriptSourceCode source_code =
- GetPendingScript()->GetSource(KURL(), error_occurred);
+ ScriptSourceCode source_code = GetPendingScript()
+ ->GetSource(KURL(), error_occurred)
+ ->GetScriptSourceCode();
EXPECT_FALSE(error_occurred);
EXPECT_TRUE(source_code.Streamer());
v8::TryCatch try_catch(scope.GetIsolate());
@@ -234,8 +237,9 @@ TEST_F(ScriptStreamingTest, SuppressingStreaming) {
EXPECT_TRUE(client->Finished());
bool error_occurred = false;
- ScriptSourceCode source_code =
- GetPendingScript()->GetSource(KURL(), error_occurred);
+ ScriptSourceCode source_code = GetPendingScript()
+ ->GetSource(KURL(), error_occurred)
+ ->GetScriptSourceCode();
EXPECT_FALSE(error_occurred);
// ScriptSourceCode doesn't refer to the streamer, since we have suppressed
// the streaming and resumed the non-streaming code path for script
@@ -261,8 +265,9 @@ TEST_F(ScriptStreamingTest, EmptyScripts) {
EXPECT_TRUE(client->Finished());
bool error_occurred = false;
- ScriptSourceCode source_code =
- GetPendingScript()->GetSource(KURL(), error_occurred);
+ ScriptSourceCode source_code = GetPendingScript()
+ ->GetSource(KURL(), error_occurred)
+ ->GetScriptSourceCode();
EXPECT_FALSE(error_occurred);
EXPECT_FALSE(source_code.Streamer());
}
@@ -287,8 +292,9 @@ TEST_F(ScriptStreamingTest, SmallScripts) {
EXPECT_TRUE(client->Finished());
bool error_occurred = false;
- ScriptSourceCode source_code =
- GetPendingScript()->GetSource(KURL(), error_occurred);
+ ScriptSourceCode source_code = GetPendingScript()
+ ->GetSource(KURL(), error_occurred)
+ ->GetScriptSourceCode();
EXPECT_FALSE(error_occurred);
EXPECT_FALSE(source_code.Streamer());
}
@@ -316,8 +322,9 @@ TEST_F(ScriptStreamingTest, ScriptsWithSmallFirstChunk) {
ProcessTasksUntilStreamingComplete();
EXPECT_TRUE(client->Finished());
bool error_occurred = false;
- ScriptSourceCode source_code =
- GetPendingScript()->GetSource(KURL(), error_occurred);
+ ScriptSourceCode source_code = GetPendingScript()
+ ->GetSource(KURL(), error_occurred)
+ ->GetScriptSourceCode();
EXPECT_FALSE(error_occurred);
EXPECT_TRUE(source_code.Streamer());
v8::TryCatch try_catch(scope.GetIsolate());
@@ -352,8 +359,9 @@ TEST_F(ScriptStreamingTest, EncodingChanges) {
ProcessTasksUntilStreamingComplete();
EXPECT_TRUE(client->Finished());
bool error_occurred = false;
- ScriptSourceCode source_code =
- GetPendingScript()->GetSource(KURL(), error_occurred);
+ ScriptSourceCode source_code = GetPendingScript()
+ ->GetSource(KURL(), error_occurred)
+ ->GetScriptSourceCode();
EXPECT_FALSE(error_occurred);
EXPECT_TRUE(source_code.Streamer());
v8::TryCatch try_catch(scope.GetIsolate());
@@ -387,8 +395,9 @@ TEST_F(ScriptStreamingTest, EncodingFromBOM) {
ProcessTasksUntilStreamingComplete();
EXPECT_TRUE(client->Finished());
bool error_occurred = false;
- ScriptSourceCode source_code =
- GetPendingScript()->GetSource(KURL(), error_occurred);
+ ScriptSourceCode source_code = GetPendingScript()
+ ->GetSource(KURL(), error_occurred)
+ ->GetScriptSourceCode();
EXPECT_FALSE(error_occurred);
EXPECT_TRUE(source_code.Streamer());
v8::TryCatch try_catch(scope.GetIsolate());
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698