| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "core/dom/ScriptModuleResolverImpl.h" | 5 #include "core/dom/ScriptModuleResolverImpl.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8BindingForTesting.h" | 7 #include "bindings/core/v8/V8BindingForTesting.h" |
| 8 #include "bindings/core/v8/V8ThrowException.h" | |
| 9 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
| 10 #include "core/dom/Modulator.h" | 9 #include "core/dom/Modulator.h" |
| 11 #include "core/dom/ModuleScript.h" | 10 #include "core/dom/ModuleScript.h" |
| 12 #include "core/testing/DummyModulator.h" | 11 #include "core/testing/DummyModulator.h" |
| 13 #include "platform/bindings/ScriptState.h" | 12 #include "platform/bindings/ScriptState.h" |
| 13 #include "platform/bindings/V8ThrowException.h" |
| 14 #include "platform/heap/Handle.h" | 14 #include "platform/heap/Handle.h" |
| 15 #include "platform/testing/TestingPlatformSupport.h" | 15 #include "platform/testing/TestingPlatformSupport.h" |
| 16 #include "public/platform/Platform.h" | 16 #include "public/platform/Platform.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "v8/include/v8.h" | 18 #include "v8/include/v8.h" |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 scope.GetExceptionState()); | 215 scope.GetExceptionState()); |
| 216 EXPECT_TRUE(scope.GetExceptionState().HadException()); | 216 EXPECT_TRUE(scope.GetExceptionState().HadException()); |
| 217 EXPECT_EQ(kUnknownError, scope.GetExceptionState().Code()); | 217 EXPECT_EQ(kUnknownError, scope.GetExceptionState().Code()); |
| 218 EXPECT_TRUE(resolved.IsNull()); | 218 EXPECT_TRUE(resolved.IsNull()); |
| 219 EXPECT_EQ(1, modulator_->GetFetchedModuleScriptCalled()); | 219 EXPECT_EQ(1, modulator_->GetFetchedModuleScriptCalled()); |
| 220 EXPECT_EQ(modulator_->FetchedUrl(), target_module_script->BaseURL()) | 220 EXPECT_EQ(modulator_->FetchedUrl(), target_module_script->BaseURL()) |
| 221 << "Unexpectedly fetched URL: " << modulator_->FetchedUrl().GetString(); | 221 << "Unexpectedly fetched URL: " << modulator_->FetchedUrl().GetString(); |
| 222 } | 222 } |
| 223 | 223 |
| 224 } // namespace blink | 224 } // namespace blink |
| OLD | NEW |