1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14

content / test / data / shared_storage / module_with_custom_header.js [blame]

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

class TestOperation {
  async run(data) {
    if (data && data.hasOwnProperty('set-key') &&
        data.hasOwnProperty('set-value')) {
      await sharedStorage.set(data['set-key'], data['set-value']);
    }
  }
}

register("test-operation", TestOperation);