From 4c5a9b1775f5a4183f359e2d36805f481a9604c5 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 28 Oct 2014 14:13:31 -0700 Subject: [PATCH] Don't crash when importing a module that doesn't export Instead of crashing, we should use the value "undefined". There's some question as to whether we should default to the document, but we can resolve that later. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/690483002 --- .../tests/modules/import-without-export-expected.txt | 1 + .../src/flutter/tests/modules/import-without-export.sky | 9 +++++++++ .../flutter/tests/modules/resources/does-not-export.sky | 1 + 3 files changed, 11 insertions(+) create mode 100644 engine/src/flutter/tests/modules/import-without-export-expected.txt create mode 100644 engine/src/flutter/tests/modules/import-without-export.sky create mode 100644 engine/src/flutter/tests/modules/resources/does-not-export.sky diff --git a/engine/src/flutter/tests/modules/import-without-export-expected.txt b/engine/src/flutter/tests/modules/import-without-export-expected.txt new file mode 100644 index 0000000000..7ef22e9a43 --- /dev/null +++ b/engine/src/flutter/tests/modules/import-without-export-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/engine/src/flutter/tests/modules/import-without-export.sky b/engine/src/flutter/tests/modules/import-without-export.sky new file mode 100644 index 0000000000..46c94bc6cc --- /dev/null +++ b/engine/src/flutter/tests/modules/import-without-export.sky @@ -0,0 +1,9 @@ + + + +
FAIL - Script did not execute
+ + diff --git a/engine/src/flutter/tests/modules/resources/does-not-export.sky b/engine/src/flutter/tests/modules/resources/does-not-export.sky new file mode 100644 index 0000000000..c570f76902 --- /dev/null +++ b/engine/src/flutter/tests/modules/resources/does-not-export.sky @@ -0,0 +1 @@ +This module has no exports.