| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 return self->bindToV8Function(); | 54 return self->bindToV8Function(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 Function(ScriptState* scriptState, String* value) | 58 Function(ScriptState* scriptState, String* value) |
| 59 : ScriptFunction(scriptState) | 59 : ScriptFunction(scriptState) |
| 60 , m_value(value) | 60 , m_value(value) |
| 61 { | 61 { |
| 62 } | 62 } |
| 63 | 63 |
| 64 virtual ScriptValue call(ScriptValue value) OVERRIDE | 64 virtual ScriptValue call(ScriptValue value) override |
| 65 { | 65 { |
| 66 ASSERT(!value.isEmpty()); | 66 ASSERT(!value.isEmpty()); |
| 67 *m_value = toCoreString(value.v8Value()->ToString()); | 67 *m_value = toCoreString(value.v8Value()->ToString()); |
| 68 return value; | 68 return value; |
| 69 } | 69 } |
| 70 | 70 |
| 71 String* m_value; | 71 String* m_value; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 class ScriptPromiseTest : public testing::Test { | 74 class ScriptPromiseTest : public testing::Test { |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 isolate()->RunMicrotasks(); | 257 isolate()->RunMicrotasks(); |
| 258 | 258 |
| 259 EXPECT_EQ(String(), onFulfilled); | 259 EXPECT_EQ(String(), onFulfilled); |
| 260 EXPECT_EQ("SyntaxError: some syntax error", onRejected); | 260 EXPECT_EQ("SyntaxError: some syntax error", onRejected); |
| 261 } | 261 } |
| 262 | 262 |
| 263 } // namespace | 263 } // namespace |
| 264 | 264 |
| 265 } // namespace blink | 265 } // namespace blink |
| OLD | NEW |