| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 return self->bindToV8Function(); | 55 return self->bindToV8Function(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 Function(ScriptState* scriptState, String* value) | 59 Function(ScriptState* scriptState, String* value) |
| 60 : ScriptFunction(scriptState) | 60 : ScriptFunction(scriptState) |
| 61 , m_value(value) | 61 , m_value(value) |
| 62 { | 62 { |
| 63 } | 63 } |
| 64 | 64 |
| 65 virtual ScriptValue call(ScriptValue value) override | 65 ScriptValue call(ScriptValue value) override |
| 66 { | 66 { |
| 67 ASSERT(!value.isEmpty()); | 67 ASSERT(!value.isEmpty()); |
| 68 *m_value = toCoreString(value.v8Value()->ToString(scriptState()->context
()).ToLocalChecked()); | 68 *m_value = toCoreString(value.v8Value()->ToString(scriptState()->context
()).ToLocalChecked()); |
| 69 return value; | 69 return value; |
| 70 } | 70 } |
| 71 | 71 |
| 72 String* m_value; | 72 String* m_value; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 class ScriptPromiseTest : public testing::Test { | 75 class ScriptPromiseTest : public testing::Test { |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 isolate()->RunMicrotasks(); | 258 isolate()->RunMicrotasks(); |
| 259 | 259 |
| 260 EXPECT_EQ(String(), onFulfilled); | 260 EXPECT_EQ(String(), onFulfilled); |
| 261 EXPECT_EQ("SyntaxError: some syntax error", onRejected); | 261 EXPECT_EQ("SyntaxError: some syntax error", onRejected); |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace | 264 } // namespace |
| 265 | 265 |
| 266 } // namespace blink | 266 } // namespace blink |
| OLD | NEW |