michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: /** michael@0: * These tests ensure that capturing a sites's thumbnail, saving it and michael@0: * retrieving it from the cache works. michael@0: */ michael@0: function runTests() { michael@0: // Create a tab with a red background. michael@0: yield addTab("data:text/html,"); michael@0: yield captureAndCheckColor(255, 0, 0, "we have a red thumbnail"); michael@0: michael@0: // Load a page with a green background. michael@0: yield navigateTo("data:text/html,"); michael@0: yield captureAndCheckColor(0, 255, 0, "we have a green thumbnail"); michael@0: michael@0: // Load a page with a blue background. michael@0: yield navigateTo("data:text/html,"); michael@0: yield captureAndCheckColor(0, 0, 255, "we have a blue thumbnail"); michael@0: }