OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/credentialmanager/PasswordCredential.h" | 5 #include "modules/credentialmanager/PasswordCredential.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
8 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | |
9 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
10 #include "core/dom/ExceptionCode.h" | 9 #include "core/dom/ExceptionCode.h" |
11 #include "core/dom/URLSearchParams.h" | 10 #include "core/dom/URLSearchParams.h" |
12 #include "core/frame/FrameView.h" | 11 #include "core/frame/FrameView.h" |
13 #include "core/html/FormData.h" | 12 #include "core/html/FormData.h" |
14 #include "core/html/HTMLFormElement.h" | 13 #include "core/html/HTMLFormElement.h" |
15 #include "core/html/forms/FormController.h" | 14 #include "core/html/forms/FormController.h" |
16 #include "core/testing/DummyPageHolder.h" | 15 #include "core/testing/DummyPageHolder.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "wtf/text/StringBuilder.h" | 17 #include "wtf/text/StringBuilder.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 DummyExceptionStateForTesting exceptionState; | 150 DummyExceptionStateForTesting exceptionState; |
152 PasswordCredential* credential = | 151 PasswordCredential* credential = |
153 PasswordCredential::create(form, exceptionState); | 152 PasswordCredential::create(form, exceptionState); |
154 EXPECT_EQ(nullptr, credential); | 153 EXPECT_EQ(nullptr, credential); |
155 EXPECT_TRUE(exceptionState.hadException()); | 154 EXPECT_TRUE(exceptionState.hadException()); |
156 EXPECT_EQ(V8TypeError, exceptionState.code()); | 155 EXPECT_EQ(V8TypeError, exceptionState.code()); |
157 EXPECT_EQ("'id' must not be empty.", exceptionState.message()); | 156 EXPECT_EQ("'id' must not be empty.", exceptionState.message()); |
158 } | 157 } |
159 | 158 |
160 } // namespace blink | 159 } // namespace blink |
OLD | NEW |