describe('options page', function() {
    this.timeout(5000);

    var FILE = 'test/empty.html';
    var PATH = 'options.html';

    it('should show empty input and help on first load', function(done) {
        beforeLoadFunction = function() {
            page.evaluate(function() {
                chrome.storage.sync.get = function(cb) {
                    cb({});
                };
            });
        };

        page.open(PATH, function(r) {
            // Empty input loaded
            page.evaluate(function() {
                assert.equal(
                    document.querySelector('input').value,
                    ''
                );
            });

            // Top bar shown
            page.evaluate(function() {
                assert.equal(
                    document.querySelector('#message h3').innerText,
                    'No rewrite rules added'
                );
            });

            done();
        });
    });

    it('should load saved rewrites', function(done) {
        beforeLoadFunction = function() {
            page.evaluate(function() {
                chrome.storage.sync.get = function(cb) {
                    cb({
                        'fromdomain.com': 'todomain.com'
                    });
                };
            });
        };

        page.open(PATH, function(r) {
            // Empty input loaded
            page.evaluate(function() {
                assert.equal(
                    document.querySelector('input').value,
                    ''
                );
            });

            done();
        });

    });
});

@@ -1429,35 +1429,164 @@
         
-assert.equal(%0A     
+var rows = document.getElementById(%22urls%22).children%5B1%5D.children;%0A                assert.equal(rows.length, 1);%0A%0A                var row = rows%5B0%5D;%0A%0A
         
@@ -1596,39 +1596,210 @@
     
-documen
+ asser
 t.
+e
 qu
-erySelector('input')
+al(%0A                    row.children%5B0%5D.firstChild.value,%0A                    'fromdomain.com'%0A                );%0A%0A                assert.equal(%0A                    row.children%5B1%5D.firstChild
 .val
@@ -1815,32 +1815,44 @@
                '
+todomain.com
 '%0A              

Implement test to load options from store.